package com.scau402.system.service.impl;

import java.util.List;
import com.scau402.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scau402.system.mapper.WmsStreamSalesMapper;
import com.scau402.system.domain.WmsStreamSales;
import com.scau402.system.service.IWmsStreamSalesService;

/**
 * 直播销售记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-26
 */
@Service
public class WmsStreamSalesServiceImpl implements IWmsStreamSalesService 
{
    @Autowired
    private WmsStreamSalesMapper wmsStreamSalesMapper;

    /**
     * 查询直播销售记录
     * 
     * @param id 直播销售记录主键
     * @return 直播销售记录
     */
    @Override
    public WmsStreamSales selectWmsStreamSalesById(Long id)
    {
        return wmsStreamSalesMapper.selectWmsStreamSalesById(id);
    }

    /**
     * 查询直播销售记录列表
     * 
     * @param wmsStreamSales 直播销售记录
     * @return 直播销售记录
     */
    @Override
    public List<WmsStreamSales> selectWmsStreamSalesList(WmsStreamSales wmsStreamSales)
    {
        return wmsStreamSalesMapper.selectWmsStreamSalesList(wmsStreamSales);
    }

    /**
     * 新增直播销售记录
     * 
     * @param wmsStreamSales 直播销售记录
     * @return 结果
     */
    @Override
    public int insertWmsStreamSales(WmsStreamSales wmsStreamSales)
    {
        wmsStreamSales.setCreateTime(DateUtils.getNowDate());
        return wmsStreamSalesMapper.insertWmsStreamSales(wmsStreamSales);
    }

    /**
     * 修改直播销售记录
     * 
     * @param wmsStreamSales 直播销售记录
     * @return 结果
     */
    @Override
    public int updateWmsStreamSales(WmsStreamSales wmsStreamSales)
    {
        wmsStreamSales.setUpdateTime(DateUtils.getNowDate());
        return wmsStreamSalesMapper.updateWmsStreamSales(wmsStreamSales);
    }

    /**
     * 批量删除直播销售记录
     * 
     * @param ids 需要删除的直播销售记录主键
     * @return 结果
     */
    @Override
    public int deleteWmsStreamSalesByIds(Long[] ids)
    {
        return wmsStreamSalesMapper.deleteWmsStreamSalesByIds(ids);
    }

    /**
     * 删除直播销售记录信息
     * 
     * @param id 直播销售记录主键
     * @return 结果
     */
    @Override
    public int deleteWmsStreamSalesById(Long id)
    {
        return wmsStreamSalesMapper.deleteWmsStreamSalesById(id);
    }
}
